package xhwl.insurance.http.api;

import com.google.gson.Gson;

import okhttp3.RequestBody;
import rx.Observable;
import xhwl.insurance.http.ApiService;
import xhwl.retrofitrx.BaseApi;

/**
 * Created by admin on 2017-07-26.
 */

public class CardInfoApi extends BaseApi {
    CardInfoReq req;
    public CardInfoApi(String saleType){
        req=new CardInfoReq(saleType);
        setShowErrorMsg(false);
    }
    @Override
    protected Observable getObservable() {
        RequestBody requestBody = RequestBody.create(okhttp3.MediaType.parse("application/json; charset=utf-8"), new Gson().toJson(req));
        return retrofit.create(ApiService.class).queryCardInfo(requestBody);
    }
    private class CardInfoReq{
        private String sale_type;

        public CardInfoReq(String saleType) {
            super();
            this.sale_type=saleType;
        }


    }
}
